﻿using FreeSql.DatabaseModel;using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace Simple.Repository.SimpleEntitys {

	/// <summary>
	/// 老人
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "elderly", DisableSyncStructure = true)]
	public partial class Elderly {

		/// <summary>
		/// 老人唯一ID
		/// </summary>
		[JsonProperty, Column(Name = "id", DbType = "bigint", IsPrimary = true, IsIdentity = true)]
		public long Id { get; set; }

		/// <summary>
		/// 公司Id
		/// </summary>
		[JsonProperty, Column(Name = "company_id", DbType = "bigint")]
		public long CompanyId { get; set; }

		/// <summary>
		/// 老人姓名
		/// </summary>
		[JsonProperty, Column(Name = "name", IsNullable = false)]
		public string Name { get; set; }

		/// <summary>
		/// 老人姓名拼音首字母
		/// </summary>
		[JsonProperty, Column(Name = "name_pinyin_capital_letter")]
		public string NamePinyinCapitalLetter { get; set; }

		/// <summary>
		/// 老人昵称
		/// </summary>
		[JsonProperty, Column(Name = "nick_name")]
		public string NickName { get; set; }

		/// <summary>
		/// 老人昵称拼音首字母
		/// </summary>
		[JsonProperty, Column(Name = "nick_name_pinyin_capital_letter")]
		public string NickNamePinyinCapitalLetter { get; set; }

		/// <summary>
		/// 身份证号
		/// </summary>
		[JsonProperty, Column(Name = "id_card")]
		public string IdCard { get; set; }

		/// <summary>
		/// 出生日期
		/// </summary>
		[JsonProperty, Column(Name = "date_of_birth", DbType = "date")]
		public DateTime? DateOfBirth { get; set; }

		/// <summary>
		/// 性别：0-未知，1-男，2-女
		/// </summary>
		[JsonProperty, Column(Name = "gender", DbType = "int")]
		public int? Gender { get; set; } = 0;

		/// <summary>
		/// 当前状态：1=在住、2=退住
		/// </summary>
		[JsonProperty, Column(Name = "status", DbType = "int")]
		public int Status { get; set; } = 0;

		/// <summary>
		/// 属相
		/// </summary>
		[JsonProperty, Column(Name = "chinese_zodiac", StringLength = 2)]
		public string ChineseZodiac { get; set; }

		/// <summary>
		/// 紧急联系人姓名
		/// </summary>
		[JsonProperty, Column(Name = "emergency_contact_name")]
		public string EmergencyContactName { get; set; }

		/// <summary>
		/// 紧急联系人关系
		/// </summary>
		[JsonProperty, Column(Name = "emergency_contact_relation")]
		public string EmergencyContactRelation { get; set; }

		/// <summary>
		/// 紧急联系人电话
		/// </summary>
		[JsonProperty, Column(Name = "emergency_contact_phone")]
		public string EmergencyContactPhone { get; set; }

		/// <summary>
		/// 血型：0=未知、1=A、2=B、3=AB、4=O
		/// </summary>
		[JsonProperty, Column(Name = "blood_type", DbType = "int")]
		public int? BloodType { get; set; } = 0;

		/// <summary>
		/// 能力等级：1=能力完好、2=轻度失能、3=中度失能、4=重度失能、5=完全失能
		/// </summary>
		[JsonProperty, Column(Name = "mobility_status", DbType = "int")]
		public int MobilityStatus { get; set; } = 0;

		/// <summary>
		/// 本人联系电话
		/// </summary>
		[JsonProperty, Column(Name = "contact_phone")]
		public string ContactPhone { get; set; }

		/// <summary>
		/// 房间号
		/// </summary>
		[JsonProperty, Column(Name = "room_number")]
		public string RoomNumber { get; set; }

		/// <summary>
		/// 床位号
		/// </summary>
		[JsonProperty, Column(Name = "bed_number")]
		public string BedNumber { get; set; }

		/// <summary>
		/// 过敏史
		/// </summary>
		[JsonProperty, Column(Name = "allergies", StringLength = -1)]
		public string Allergies { get; set; }

		/// <summary>
		/// 既往史
		/// </summary>
		[JsonProperty, Column(Name = "major_medical_history", StringLength = -1)]
		public string MajorMedicalHistory { get; set; }

		/// <summary>
		/// 风险防范
		/// </summary>
		[JsonProperty, Column(Name = "risk_prevention", StringLength = -1)]
		public string RiskPrevention { get; set; }

		/// <summary>
		/// 特殊照护注意事项
		/// </summary>
		[JsonProperty, Column(Name = "special_care_precautions", StringLength = -1)]
		public string SpecialCarePrecautions { get; set; }

		/// <summary>
		/// 个性化照护需求
		/// </summary>
		[JsonProperty, Column(Name = "personalized_care_needs", StringLength = -1)]
		public string PersonalizedCareNeeds { get; set; }

		/// <summary>
		/// 当前服用药物
		/// </summary>
		[JsonProperty, Column(Name = "current_medications", StringLength = -1)]
		public string CurrentMedications { get; set; }

		/// <summary>
		/// 饮食要求
		/// </summary>
		[JsonProperty, Column(Name = "dietary_requirements", StringLength = -1)]
		public string DietaryRequirements { get; set; }

		/// <summary>
		/// 入住日期
		/// </summary>
		[JsonProperty, Column(Name = "check_in_date", DbType = "date")]
		public DateTime? CheckInDate { get; set; }

		/// <summary>
		/// 合同到期日期
		/// </summary>
		[JsonProperty, Column(Name = "contract_expiry_date", DbType = "date")]
		public DateTime? ContractExpiryDate { get; set; }

		/// <summary>
		/// 头像Url
		/// </summary>
		[JsonProperty, Column(Name = "avatar_url")]
		public string AvatarUrl { get; set; }

		/// <summary>
		/// 照片Urls
		/// </summary>
		[JsonProperty, Column(Name = "photo_urls", StringLength = -1)]
		public string PhotoUrls { get; set; }

		/// <summary>
		/// 个人生活习惯
		/// </summary>
		[JsonProperty, Column(Name = "personal_habits", StringLength = -1)]
		public string PersonalHabits { get; set; }

		/// <summary>
		/// 家庭地址
		/// </summary>
		[JsonProperty, Column(Name = "address")]
		public string Address { get; set; }

		/// <summary>
		/// 微信号
		/// </summary>
		[JsonProperty, Column(Name = "wechat_id")]
		public string WechatId { get; set; }

		/// <summary>
		/// 其他备注
		/// </summary>
		[JsonProperty, Column(Name = "notes", StringLength = -1)]
		public string Notes { get; set; }

		/// <summary>
		/// 是否设置过照护计划：0=未设置，1=已设置
		/// </summary>
		[JsonProperty, Column(Name = "is_setting_care_plan", DbType = "int")]
		public int IsSettingCarePlan { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "create_time", DbType = "datetime")]
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[JsonProperty, Column(Name = "create_by", DbType = "bigint")]
		public long CreateBy { get; set; }

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_time", DbType = "datetime")]
		public DateTime UpdateTime { get; set; }

		/// <summary>
		/// 更新人
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "bigint")]
		public long UpdateBy { get; set; }

		/// <summary>
		/// 是否删除：0=未删除、1=已删除
		/// </summary>
		[JsonProperty, Column(Name = "is_delete", DbType = "int")]
		public int IsDelete { get; set; }

	}

}
